﻿#region Imports
using System.Windows.Media;
using CommonUtilities.Util;
#endregion

namespace DirectoryAnalyzer.Controls.ViewModels
{
    /// <summary>
    /// ViewModel for ToggleButton control
    /// </summary>
    public class ToggleButtonViewModel : BaseViewModel
    {
        #region Properties
        private string toggleButtonText;
        public string ToggleButtonText
        {
            get { return toggleButtonText; }
            set { toggleButtonText = value; RaisePropertyChanged("ToggleButtonText"); }
        }

        public static bool isToggleChecked = false;
        public bool IsToggleChecked
        {
            get { return isToggleChecked; }
            set
            {
                isToggleChecked = value; RaisePropertyChanged("IsToggleChecked");
                ToggleButtonText = isToggleChecked ? TextTrue : TextFalse;
            }
        }

        public static string textTrue = "True -> False";
        /// <summary>
        /// Text to display when 'toggle' value is 'true'
        /// <para>Hint: Directs user to select button to perform actions to make it 'false'</para>
        /// </summary>
        public string TextTrue
        {
            get { return textTrue; }
            set { textTrue = value; RaisePropertyChanged("TextTrue"); }
        }

        public static string textFalse = "False -> True";
        /// <summary>
        /// Text to display when 'toggle' value is 'false'
        /// <para>Hint: Directs user to select button to perform actions to make it 'true'</para>
        /// </summary>
        public string TextFalse
        {
            get { return textFalse; }
            set { textFalse = value; RaisePropertyChanged("TextFalse"); }
        }

        private ImageSource graphImageSource;
        public ImageSource GraphImageSource
        {
            get { return graphImageSource; }
            set { graphImageSource = value; RaisePropertyChanged("GraphImageSource"); }
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Default constructor
        /// </summary>
        public ToggleButtonViewModel()
        {
            ;
        }
        #endregion

        #region Methods
        public void RefreshName()
        {
            RaisePropertyChanged("ToggleButtonText");
        }
        #endregion
    }
}
